<?php
/*
  How to remove following
  a) false
  b) NULL
  c) '0'
  d) ''
  as values from any array?

  Ans :
  $filter_array = array_filter($old_array);

*/



$email = array (
  0 => 'hello1@gmail.com',
  1 => '" hello2@gmail.com "',
  11 => 'hello2@gmail.com',
  2 => 'hello3@gmail.com',
  22 => '',
  'vikas' => 'hello4@gmail.com',
  4 => '" hello5@gmail.com "',
  44 => '0',
  5 => 'hello6@gmail.com',
  5 => false,
  66 => 'hello7@gmail.com',
  6 => null,
  666 => 'hello7@gmail.com',
);
$email = array_unique($email);
$email = array_filter($email);
$email = array_values($email);

var_export($email);
exit;

$keys = array_keys($email);
var_export($email);

